<?php

// $Id$

require_once(TANGRA_MAIN_DIR.'db/paginate_db_data.class.php');
require_once(TANGRA_MAIN_DIR.'grids/grid_ctrl.class.php');

require_once($WSC->get_site_inc_dir().'modules/tangra_cms/grids/menu_types/menu_types_grid.class.php');
require_once($WSC->get_site_inc_dir().'modules/tangra_cms/classes/menu/tcms_menu_type_dbc.class.php');


class Menu_Types_Grid_Ctrl extends Grid_Ctrl {
	protected function create_grid() {
		$ret = new Menu_Types_Grid();

		return $ret;
	}


	protected function create_paginate_db_data() {
		$sqls = TCMS_Menu_Type_DBC::get_sql_for_grid();
		$sqlc = TCMS_Menu_Type_DBC::get_sql_count_for_grid();

		$pdbd = new Paginate_DB_Data($this->grid->get_page_size(), $sqls, $sqlc);

		return $pdbd;
	}
}